import java.util.TreeSet;

public class Manager {
    private TreeSet<Student> set;

    public Manager() {
        this.set = new TreeSet<>();
    }

    public void put(Student std) {
        set.add(std);
    }

    public void remove(Student std) {
        set.remove(std);
    }

    public Student searching(String id) {
        for (Student student : set) {
            if (student.getId().equals(id)) {
                return student;
            }
        }
        return null;
    }

    public void show() {
        System.out.println("学号        姓名      年龄  成绩                总分    平均分");
        for (Student student : set) {
            System.out.println(student);
        }
    }
}    